/*
 *	Copyright © 2013 Changsha Shishuo Network Technology Co., Ltd. All rights reserved.
 *	长沙市师说网络科技有限公司 版权所有
 *	http://www.shishuo.com
 */

package com.hlingsoft.kkh.dao;

import com.hlingsoft.kkh.entity.AppUserMessage;
import com.hlingsoft.kkh.entity.MerchantMessage;
import com.hlingsoft.kkh.entity.SystemMessage;
import com.hlingsoft.kkh.entity.vo.MessageVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户服务
 * 
 * @author Zhang jiale
 * 
 */

@Repository
public interface MessageDao {

	public int addMessage(MessageVo message);
	public int addMerchantMessage(MerchantMessage message);


	public int addUserMessage(AppUserMessage message);

	public List<AppUserMessage> getMessageList(@Param("offset") long offset,
										@Param("rows") long rows);

	public List<SystemMessage> getUnReadUserSystemMessageList(@Param("offset") long offset,
														  @Param("rows") long rows);

	public List<AppUserMessage> getUnReadMessageListByUserId(@Param("userId") long userId,@Param("offset") long offset,
										@Param("rows") long rows);

	public List<AppUserMessage> getMessageListByMerchantId(@Param("merchantId") long merchantId,@Param("offset") long offset,
												@Param("rows") long rows);


	public List<SystemMessage> getUnReadMerchantSystemMessageList(@Param("offset") long offset,
														  @Param("rows") long rows);



	public List<MerchantMessage> getUnReadMessageListByMerchantId(@Param("merchantId") long merchantId,@Param("offset") long offset,
														@Param("rows") long rows);
}
